package com.hh.demo.dto;

import com.hh.demo.util.AssertUtil;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

/**
 * 发送短信验证码的dto
 * @author 黄浩
 * @create 2022-06-16 18:01
 */
@Data
public class TelCodeDto {
    @Pattern(regexp = AssertUtil.TEL_REGEX,message = "手机号不合法")
    private String mobile;

    @NotEmpty(message = "图形验证码的key不能为空")
    private String imageCodeKey;

    @Size(min = 4,max = 4,message = "图形验证码必须是四位")
    private String imageCode;

    @NotEmpty(message = "类型不能为空")
    private String type;
}
